<template>
  <div>
    <canvas id="q"></canvas>
  </div>
</template>

<script>
export default {
  mounted() {
    var canvas = document.getElementById("q");
    var $this = this;
       $this.QRCode.toCanvas(
        canvas,
         "https://qr.alipay.com/bax03480w0r8toqflrx800f5",
        function(error) {
          if (error) {
            console.error(error);
          }
          console.log("QRCode success!");
        }
      );
  }
};
</script>
